package com.hst.web.base.proxy;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.hst.core.Page;
import com.hst.core.ServiceContext;
import com.hst.core.dao.IORDao;
import com.hst.core.dao.ISQLDao;
import com.hst.core.meta.proxies.DefaultDataProxy;
import com.hst.web.auth.po.User;
import com.hst.web.base.service.UserRoleService;

public class FlowTaskVehicleProxy extends DefaultDataProxy{
	
	@Autowired
	IORDao dao;
	
	@Autowired
	UserRoleService us;
	
	@Autowired
	ISQLDao sql;
	
	@SuppressWarnings("unchecked")
	@Override
	public Page<?> list(Map<String, ?> query, int pageIdx) {
		Map<String,Object> map = new HashMap<String,Object>();
		map = (Map<String, Object>) query;
		User u = (User) ServiceContext.getInstance().getUser();
		map.put("id", u.getId());
		map.put("userid", u.getUserid());
		return sql.list("vehicle.flowTasks", map, pageIdx, Page.getPageSize());
	}
}
